<?php


namespace App\Admin\Actions\Post;


use App\Admin\Actions\RowAction;
use App\BookApply;
use App\PlantVariety;
use Illuminate\Http\Request;

class PlantApprovePost extends RowAction
{
    public $name = '已审定';

    public function handle(PlantVariety $model)
    {
        $model->status = 1;
        $model->save();
        return $this->response()->swal()->success('操作成功')->refresh();
    }

    public function dialog()
    {
        return $this->confirm('确定已审定吗？');
    }

}
